﻿namespace Pottery.FrontEnd.ViewModels
{
    using System.ComponentModel.DataAnnotations;
    using Pottery.Model.Infrastructure;

    public class LogOnViewModel
    {
        #region Properties

        /// <summary>
        /// User Login
        /// </summary>
        [Display(Name = "Login", ResourceType = typeof(Resources.LogOn))]
        [Required(ErrorMessageResourceName = "LoginErrorMessage", ErrorMessageResourceType = typeof(Resources.LogOn))]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.Text)]        
        [MaxLength(ModelConstants.MAX_LOGIN_LENGTH)]
        [MinLength(ModelConstants.MIN_LOGIN_LENGTH)]
        public string Login { get; set; }

        /// <summary>
        /// User Password
        /// </summary>
        [Display(Name = "Password", ResourceType = typeof(Resources.LogOn))]
        [Required(ErrorMessageResourceName = "PasswordErrorMessage", ErrorMessageResourceType = typeof(Resources.LogOn))]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.Password)]
        [MaxLength(ModelConstants.MAX_PASSWORD_LENGTH)]
        [MinLength(ModelConstants.MIN_PASSWORD_LENGTH)]
        public string Password { get; set; }

        /// <summary>
        /// Check Box Remember Me
        /// </summary>
        [Display(Name = "RememberMe", ResourceType = typeof(Resources.LogOn))]
        public bool RememberMe { get; set; }

        #endregion Properties
    }
}